<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html class=" -webkit-">

	<head>
		<title>杰利联合</title>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
		<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
		<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
		<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
		<meta content="no-cache" http-equiv="pragma">
		<meta content="0" http-equiv="expires">
		<meta content="telephone=no, address=no" name="format-detection">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
		<link
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/jiu/css/mobile_module.css?v=1492676217" media="all">
		<script type="text/javascript">
			//静态变量
			var WX_APPID = "";
			var WXJS_TIMESTAMP = '';
			var NONCESTR = '';
			var SIGNATURE = '';
		</script>
		<script type="text/javascript" src="${ctxStatic}/jiu/js/jquery-2.0.3.min.js"></script>
		<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script type="text/javascript" src="${ctxStatic}/jiu/js/prefixfree.min.js?v=1492676217"></script>
		<script type="text/javascript" src="${ctxStatic}/jiu/js/dialog.js?v=1492676217"></script>
		<script type="text/javascript" src="${ctxStatic}/jiu/js/flipsnap.min.js?v=1492676217"></script>
		<script type="text/javascript" src="${ctxStatic}/jiu/js/mobile_module.js?v=1492676217"></script>
		<link href="${ctxStatic}/jiu/css/common.css?v=1492676217" rel="stylesheet" type="text/css">
		<link rel="stylesheet" href="${ctxStatic}/jiu/css/weui.min.css" />
		<style>
			.order_list .ping {
				background-color: #F5C928;
			    border: 1px solid #F5C928;
			    position: absolute;
			    right: 80px;
			    bottom: 5px;
			    width: 45px;
			    height: 30px;
			    line-height: 5px;
			    font-size: 14px;
			    color: #4E4C4C;
			}
			.info{
			margin-left: 30px;
			}
			.name{
			overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
			}
			span {
	white-space: pre-wrap;
	white-space: -moz-pre-wrap;
	white-space: -o-pre-wrap;
	word-wrap: break-word;
}
		</style>
	</head>

	<body class="withFoot">
	<div class="modal fade" style="margin-top: 30%;" id="myModal"
		tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header" style="width: 100%; position: relative">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close"
						style="position: absolute; right: 10px; text-align: right">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">操作提示</h4>
				</div>
				<div class="modal-body">
					<p class="modal-title" id="myModalLabelTwo"></p>
					<input class="myremark"
						style="height: 40px; width: 100%; margin-top: 10px;" type="text" />
				</div>
				<div class="modal-footer"
					style="display: flex; justify-content: space-between;">
					<button type="button" class="btn btn-success" data-dismiss="modal"
						id="yes" style="width: 100px">确定</button>
					<button style="width: 100px; background: red;" type="button"
						class="btn btn-danger" data-dismiss="modal" id="no">取消</button>
				</div>
			</div>
		</div>
	</div>
		<div class="top_tab" style="position: fixed;top: 0;z-index: 2;width: 100%;">
			<a href="#" class="zhankai" style="color:white;background-color: #30B0F3;">全部订单<img src="${ctxStatic}/jiu/img/ss.png" style="height: 10px;" /></a>

		</div>

		<!-- 订单信息 -->

		<div style="position: fixed;top: 50px;z-index: 2;width: 100%;height: 100%;background:rgba(0, 0, 0, 0.5);display: none;" class="xuanze">
			<div class="weui-cells weui-cells_radio">
							<label class="weui-cell weui-check__label" for="x16" id="id6">				
						          <div class="weui-cell__bd">
						            <p>全部</p>
						          </div>
						          <div class="weui-cell__ft">
						            <input type="radio" name="radio1" class="weui-check" id="x16">
						            <span class="weui-icon-checked"></span>
						          </div>
					        </label>
					        
				             <label class="weui-cell weui-check__label" for="x11" id="id1">
						          <div class="weui-cell__bd">
						            <p>未完成</p>
						          </div>
						          <div class="weui-cell__ft">
						            <input type="radio" class="weui-check" name="radio1" id="x11" >
						            <span class="weui-icon-checked"></span>
						          </div>
					        </label>
				            <label class="weui-cell weui-check__label" for="x12" id="id2" >						
						          <div class="weui-cell__bd">
						            <p>撤销申请中</p>
						          </div>
						          <div class="weui-cell__ft">
						            <input type="radio" name="radio1" class="weui-check" id="x12" >
						            <span class="weui-icon-checked"></span>
						          </div>
					        </label>
			                 <label class="weui-cell weui-check__label" for="x13" id="id3" >
						          <div class="weui-cell__bd">
						            <p>已完成</p>
						          </div>
						          <div class="weui-cell__ft">
						            <input type="radio" class="weui-check" name="radio1" id="x13">
						            <span class="weui-icon-checked"></span>
						          </div>
					        </label>
							<label class="weui-cell weui-check__label" for="x14" id="id4">				
						          <div class="weui-cell__bd">
						            <p>已结算</p>
						          </div>
						          <div class="weui-cell__ft">
						            <input type="radio" name="radio1" class="weui-check" id="x14">
						            <span class="weui-icon-checked"></span>
						          </div>
					        </label>
							<label class="weui-cell weui-check__label" for="x15" id="id5">				
						          <div class="weui-cell__bd">
						            <p>已撤销</p>
						          </div>
						          <div class="weui-cell__ft">
						            <input type="radio" name="radio1" class="weui-check" id="x15">
						            <span class="weui-icon-checked"></span>
						          </div>
					        </label>
					        
			</div>
		</div>
		<div class="" style="margin-top: 50px;">

			<div class="order_list">
				<ul class="u" id="productContainer">
					 <!-- <li>
						<p class="top">
							<span class="t">订单编号：JJDZ61204</span><br>
							<span class="c">传图设计师：<span class="blue">王海波</span></span>
						</p>
						<div class="goods_item">
							<img src="http://jiujiu.hbweiyinqing.cn/Uploads/Picture/2016-09-08/57d11f1083893.png">
							<div class="info">
								<p class="name">汽车东站玖久广告</p>
								<p class="property">
									<span class="colorless">价格</span>
									<span class="orange">336积分</span>
								</p>
								<p class="property">
									<span class="colorless">数量</span>
									<span>336</span>
								</p>
								<p style="margin-top: 3px;">
								 <span class="colorless">2017-12-12 12:12</span>														
								</p >
							</div>
							</div>
							<div style="padding-top: 35px;">
								<button class="btn gray_btn" style="right: 160px;width: 50px;background-color: #EC4708;">评价</button> 
								<button class="btn gray_btn" style="right: 95px;width: 50px;background-color: #F78901;">撤单</button> 
								<button class="btn gray_btn" style="right: 10px;">下单成功</button> 
							</div>
					</li> -->

				</ul>
			</div>
		</div>

		<!-- 底部导航 -->
		
	</body>
		<script>

				window.alert = function(name){
			  var iframe = document.createElement("IFRAME");
			  iframe.style.display="none";
			  iframe.setAttribute("src", 'data:text/plain,');
			  document.documentElement.appendChild(iframe);
			  window.frames[0].window.alert(name);
			  iframe.parentNode.removeChild(iframe);
			 };
			 
			 window.confirm = function (message) {
			   var iframe = document.createElement("IFRAME");
			   iframe.style.display = "none";
			   iframe.setAttribute("src", 'data:text/plain,');
			   document.documentElement.appendChild(iframe);
			   var alertFrame = window.frames[0];
			   var result = alertFrame.window.confirm(message);
			   iframe.parentNode.removeChild(iframe);
			   return result;
			 };	
		

			var timestamp=Date.parse(new Date());
			$(document).ready(function() {
				$('#id1').click(function() {
					$('.xuanze').hide();
					$('#chengong').hide();
					$('#weishenhe').show();
					
					gaibian(2);
				})
				$('#id2').click(function() {
					$('.xuanze').hide();
					$('#chengong').show();
					$('#weishenhe').hide();
					
					gaibian(3);

				})
				$('#id3').click(function() {
					$('.xuanze').hide();
					
					gaibian(5);
				})
				$('#id4').click(function() {
					$('.xuanze').hide();
					
					gaibian(6);
				})
				$('#id5').click(function() {
					$('.xuanze').hide();
					
					gaibian(4);
				})
				$('#id6').click(function() {
					$('.xuanze').hide();
					
					gaibian('');
				})
				

			})
			$(document).ready(function() {
				$('.zhankai').click(function() {
					$('.xuanze').toggle();
				})
			})
			
			function gaibian(state){
				pageNo=1;
				states=state;
				var cha=Date.parse(new Date())-timestamp;
				
				timestamp=Date.parse(new Date());
				console.log(cha);
				if(cha>1000){
					pullupRefresh();
				}
			}
		</script>
		
		
		<script type="text/javascript">
		 var states='';
		 var pageNo = 1;
//获取滚动条当前的位置 

function getScrollTop() { 

var scrollTop = 0; 

if (document.documentElement && document.documentElement.scrollTop) { 

scrollTop = document.documentElement.scrollTop; 

} 

else if (document.body) { 

scrollTop = document.body.scrollTop; 

} 

return scrollTop; 

} 



//获取当前可是范围的高度 

function getClientHeight() { 

var clientHeight = 0; 

if (document.body.clientHeight && document.documentElement.clientHeight) { 

clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight); 

} 

else { 

clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight); 

} 

return clientHeight; 

} 



//获取文档完整的高度 

function getScrollHeight() { 

return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 

} 



window.onscroll = function () {

	$("#tip").html("请等待正在加载中……");

if (getScrollTop() + getClientHeight() == getScrollHeight()) { 
	if(pageNo!='1'){
		pullupRefresh();
	}

	$("#tip").html("上拉加载更多");

}

} 

$(function(){
	pullupRefresh();
});





/**

 * 上拉加载具体业务实现

 */

 var ajaxFlag = 1;
 var usertype = "${usertype}";

function pullupRefresh(){
	
	/* $("#tip").html("正在加载中");

	if(ajaxFlag==0){

		return ;

	} */

	 $.get("${ctxFront}/jiu/ajaxFactoryOrder?v="+Math.random(), {uid:"${uid}",pageNo: pageNo,pageSize:15,factoryId:"${jiuManufactor.id}",states:states}, function(data){
		
		 var innerHTML= "";
		 
		 var list = data.result;
		 var aaa=data.issonghuoyuan;
		//添加
		 var usertype = ${usertype};
		 var issonghuoyuan=new Boolean(aaa); 
		 
		
		 
		 if(pageNo==1){
			 $("#productContainer").empty();
			 
			 
			 if(list.length==0){
				 innerHTML+='<div class="empty_container">'+
							'<p>暂时无订单</p>'+
							'</div>';
				}
		 }
		pageNo++;



		$.each(list, function(i, n){
			if(n.states=='0' || n.states=='1'){
				return;
			}
			innerHTML += '<li>'
				+ '<p class="top">'
				+ '<span class="t">订单编号：'
				+ n.orderNo
				+ '</span><br>'
				+ '<span class="c">传图设计师：<span class="blue">'
				+ n.designName
				+ "</span></span>";
		if (n.takeName != ''
				&& n.takeName != undefined) {
			innerHTML += '<br><span class="c">收货人：<span class="blue">'
					+ n.takeName
					+ '</span></span>';
		}
						if (n.states == '2') {
							if (n.confirmName != ''
									&& n.confirmName != undefined) {
								innerHTML += '<br><span class="c">门店审核人：<span class="blue">'
										+ n.confirmName
										+ '</span></span>';
							}
							if (n.busConfirmRemarks != ''
									&& n.busConfirmRemarks != undefined) {
								innerHTML += '<br><span class="c">门店审核备注：<span class="blue">'
										+ n.busConfirmRemarks
										+ '</span></span>';
							}
						}
						if (n.states == '3') {
							if (n.confirmName != ''
								&& n.confirmName != undefined) {
							innerHTML += '<br><span class="c">门店审核人：<span class="blue">'
									+ n.confirmName
									+ '</span></span>';
						}
						if (n.busConfirmRemarks != ''
								&& n.busConfirmRemarks != undefined) {
							innerHTML += '<br><span class="c">门店审核备注：<span class="blue">'
									+ n.busConfirmRemarks
									+ '</span></span>';
						}
							if (n.applyName != ''
									&& n.applyName != undefined) {
								innerHTML += '<br><span class="c">厂家申请撤销人：<span class="blue">'
										+ n.applyName
										+ '</span></span>';
							}
							if (n.manApplyRevokeRemarks != ''
									&& n.manApplyRevokeRemarks != undefined) {
								innerHTML += '<br><span class="c">厂家申请撤销备注：<span class="blue">'
										+ n.manApplyRevokeRemarks
										+ '</span></span>';
							}
						}
						if (n.states == '4') {
							if (n.confirmName != ''
								&& n.confirmName != undefined) {
							innerHTML += '<br><span class="c">门店审核人：<span class="blue">'
									+ n.confirmName
									+ '</span></span>';
						}
						if (n.busConfirmRemarks != ''
								&& n.busConfirmRemarks != undefined) {
							innerHTML += '<br><span class="c">门店审核备注：<span class="blue">'
									+ n.busConfirmRemarks
									+ '</span></span>';
						}
							if (n.applyName != ''
									&& n.applyName != undefined) {
								innerHTML += '<br><span class="c">厂家申请撤销人：<span class="blue">'
										+ n.applyName
										+ '</span></span>';
							}
							if (n.manRevokeName != ''
									&& n.manRevokeName != undefined) {
								innerHTML += '<br><span class="c">厂家撤销人：<span class="blue">'
										+ n.manRevokeName
										+ '</span></span>';
							}
							if (n.manRevokeRemarks != ''
									&& n.manRevokeRemarks != undefined) {
								innerHTML += '<br><span class="c">厂家撤销备注：<span class="blue">'
										+ n.manRevokeRemarks
										+ '</span></span>';
							}
						}
						if (n.states == '5') {
							if (n.confirmName != ''
								&& n.confirmName != undefined) {
							innerHTML += '<br><span class="c">门店审核人：<span class="blue">'
									+ n.confirmName
									+ '</span></span>';
						}
						if (n.busConfirmRemarks != ''
								&& n.busConfirmRemarks != undefined) {
							innerHTML += '<br><span class="c">门店审核备注：<span class="blue">'
									+ n.busConfirmRemarks
									+ '</span></span>';
						}
							if (n.completeRemarks != ''
									&& n.completeRemarks != undefined) {
								innerHTML += '<br><span class="c">订单完成备注：<span class="blue">'
										+ n.completeRemarks
										+ '</span></span>';
							}
						}
						if (n.states == '6') {
							if (n.confirmName != ''
								&& n.confirmName != undefined) {
							innerHTML += '<br><span class="c">门店审核人：<span class="blue">'
									+ n.confirmName
									+ '</span></span>';
						}
						if (n.busConfirmRemarks != ''
								&& n.busConfirmRemarks != undefined) {
							innerHTML += '<br><span class="c">门店审核备注：<span class="blue">'
									+ n.busConfirmRemarks
									+ '</span></span>';
						}
							if (n.settlementRen != ''
									&& n.settlementRen != undefined) {
								innerHTML += '<br><span class="c">结算人：<span class="blue">'
										+ n.settlementRen
										+ '</span></span>';
							}
							if (n.settlementRemarks != ''
									&& n.settlementRemarks != undefined) {
								innerHTML += '<br><span class="c">结算备注：<span class="blue">'
										+ n.settlementRemarks
										+ '</span></span>';
							}
							if (n.completeRemarks != ''
								&& n.completeRemarks != undefined) {
							innerHTML += '<br><span class="c">订单完成备注：<span class="blue">'
									+ n.completeRemarks
									+ '</span></span>';
						  }
						}
						if (n.states == '7') {
							if (n.confirmName != ''
								&& n.confirmName != undefined) {
							innerHTML += '<br><span class="c">门店审核人：<span class="blue">'
									+ n.confirmName
									+ '</span></span>';
						}
						if (n.busConfirmRemarks != ''
								&& n.busConfirmRemarks != undefined) {
							innerHTML += '<br><span class="c">门店审核备注：<span class="blue">'
									+ n.busConfirmRemarks
							
							if (n.applyFanshenName != ''
									&& n.applyFanshenName != undefined) {
								innerHTML += '<br><span class="c">厂家申请反审人：<span class="blue">'
										+ n.trialRen
										+ '</span></span>';
							}
							if (n.applyFanshenRemarks != ''
									&& n.applyFanshenRemarks != undefined) {
								innerHTML += '<br><span class="c">厂家申请反审备注：<span class="blue">'
										+ n.applyFanshenRemarks
										+ '</span></span>';
							}
							if (n.trialRen != ''
									&& n.trialRen != undefined) {
								innerHTML += '<br><span class="c">厂家反审人：<span class="blue">'
										+ n.trialRen
										+ '</span></span>';
							}
							if (n.trialRemarks != ''
									&& n.trialRemarks != undefined) {
								innerHTML += '<br><span class="c">厂家反审备注：<span class="blue">'
										+ n.trialRemarks
										+ '</span></span>';
							}
						 }
						}
						
						
						
						innerHTML+='</p>'+
					'<div class="goods_item">';
					
					
					
						if(n.storeLogo==undefined || n.storeLogo==''){
							innerHTML+='<img src="'+n.store.headimgurl+'" onclick="toSeeStoreAllEvaluate('+n.storeId+')">';
						}else{
							innerHTML+='<img src="'+n.store.headimgurl+'" onclick="toSeeStoreAllEvaluate('+n.storeId+')">';
						}
						
						
						
						innerHTML+='<div class="info">'+
							'<p class="name">门店：'+n.storeName+'</p>'+
							'<p class="property">'+
								'<span class="colorless">总价：</span>'+
								'<span class="orange">'+n.totalPrice+'积分</span>'+
							'</p>'+
							'<p class="property">'+
								'<span class="colorless">数量：</span>'+
								'<span>'+n.orderNum+'</span>'+
							'</p>';
							if (n.states == '2') {
								innerHTML += '<p style="margin-top: 3px;">'
										+ '<span class="colorless">'
										+ getLocalTime(n.busConfirmTime)
										+ '</span>'
										+ '</p>'
										+ '</div></div>';
							}
							if (n.states == '3') {
								innerHTML += '<p style="margin-top: 3px;">'
										+ '<span class="colorless">'
										+ getLocalTime(n.manApplyRevokeTime)
										+ '</span>'
										+ '</p>'
										+ '</div></div>';
							}
							if (n.states == '4') {
								innerHTML += '<p style="margin-top: 3px;">'
										+ '<span class="colorless">'
										+ getLocalTime(n.manRevokeTime)
										+ '</span>'
										+ '</p>'
										+ '</div></div>';
							}
							if (n.states == '5') {
								innerHTML += '<p style="margin-top: 3px;">'
										+ '<span class="colorless">'
										+ getLocalTime(n.completeTime)
										+ '</span>'
										+ '</p>'
										+ '</div></div>';
							}
							if (n.states == '6') {
								innerHTML += '<p style="margin-top: 3px;">'
										+ '<span class="colorless">'
										+ getLocalTime(n.settlementTime)
										+ '</span>'
										+ '</p>'
										+ '</div></div>';
							}
							if (n.states == '7') {
								innerHTML += '<p style="margin-top: 3px;">'
										+ '<span class="colorless">'
										+ getLocalTime(n.trialTime)
										+ '</span>'
										+ '</p>'
										+ '</div></div>';
							}
					
						innerHTML+='<div style="padding-top: 35px;">';
							/* '<button class="btn gray_btn" style="right: 160px;width: 50px;background-color: #EC4708;">评价</button>'+
							'<button class="btn gray_btn" style="right: 95px;width: 50px;background-color: #F78901;">撤单</button>'+
							'<button class="btn gray_btn" style="right: 10px;">下单成功</button>'; */
					///	666666666666666666
						 ////状态	0：商家未审核 1：商家已取消	2：下单成功	3：厂家申请撤销 	4：厂家已撤销	5：完成	6：已结算（完成三天后自动充值到厂家门店）7:已反审
						
					/* 	 if("false"===issonghuoyuan.toString()){
							
							if(1==n.isEvaluateStore){
							
								if(n.isHasNoRead){
	 								
									innerHTML +='<div style="height:10px;width: 10px;background-color: #C9302C;left:70px;bottom: 28px;position: absolute;z-index: 1;border-radius: 20px;"></div>'+
	 								'<button class="btn gray_btn" style="left: 10px;border-radius: 10px;background-color: #fff;color: #8c8a8a;border: 1px solid #eee;"  onclick="toAddSubEvaluate('+n.id+')">客户评价</button>';
	 								
	 							}else{
	 								innerHTML +='<button class="btn gray_btn" style="left: 10px;border-radius: 10px;background-color: #fff;color: #8c8a8a;border: 1px solid #eee;"  onclick="toAddSubEvaluate('+n.id+')">客户评价</button>';
	 							}
								
								
							/* 	innerHTML +='<button class="btn gray_btn" style="left: 10px;border-radius: 10px;background-color: #fff;color: #8c8a8a;border: 1px solid #eee;"  onclick="toAddSubEvaluate('+n.id+')">客户评价</button>'; */
					/* 	 	}
							innerHTML +='<button class="btn gray_btn" style="right: 90px;width: 45px;background-color: #EC4708;" onclick="toEvaluate('+n.id+')">评价</button>';
							
							
						}  */ 
						
						if(n.states=='2'){//下单成功
							if(usertype == "1"){//送货员
								innerHTML+='<button class="btn gray_btn" style="right: 225px;background-color: #EC4708;" onclick="toUploadPic('+n.id+')">拍照完成</button>';
							}
							if(usertype == "0"){//接单员
								innerHTML+='<button class="btn yellow_btn" style="right: 145px;" onclick="toApplyRevoke('+n.id+')">申请撤销</button>';
							}
							innerHTML+='<button class="btn gray_btn" style="right: 10px;">下单成功</button> </div>';
						}else if(n.states=='3'){//厂家申请撤销
	         			 innerHTML+='<button class="btn gray_btn" style="right: 10px;">申请撤销</button> </div>';
							      
						}else if(n.states=='4'){
							innerHTML+='<button class="btn gray_btn" style="right: 10px;">您已撤销</button> </div>';
						}else if(n.states=='5'){
							if (typeof(n.uploadPic) != "undefined" && n.uploadPic != ""){
								innerHTML+='<button class="btn gray_btn" style="right: 145px;width: 100px;background-color: #EC4708;" onclick="toUploadPicView('+n.id+')">查看收货凭证</button>';
							}
							
							innerHTML+='<button class="btn gray_btn" style="right: 10px;">已完成</button> </div>';
						}else if(n.states=='6'){
							innerHTML+='<button class="btn gray_btn" style="right: 10px;">已结算</button> </div>';
						}else if(n.states=='7'){
							innerHTML+='<button class="btn gray_btn" style="right: 10px;">已反审</button> </div>';
						}
						
						innerHTML+='</div>'+
				'</li>';
		 });
		 $("#productContainer").append(innerHTML);
	  }); 

}

</script>

<script>
function toAddSubEvaluate(orderId){
	window.location.href="${ctxFront }/jiu/addSubEvaluate?uid=${uid}&type=2&orderId="+orderId;
}

	function toApplyFanShen(id){
		$('#myModal').modal('show');
		$("#myModalLabelTwo").text("请输入反审原因,提交后请联系15511000094");
		$("#yes").click(function() {
			var remarks = $(".myremark").val();
			$.ajax({
				type : 'POST',
				url : "${ctxFront }/jiuApply/toApplyFanShen",
				dataType : "json",
				cache : true,
				async : false,
				data : {
					id : id,
					remarks : remarks
				},
				success : function(data) {
					$('#myModal').modal('show');
					$("#modal-body").text(data.message);
					window.location.reload();
				}
			});
		});
	}
	function factoryOrder(states){
		window.location.href="${ctxFront }/jiu/factoryOrder?uid=${uid}&states="+states;
	}
	
	//审核撤销申请
	function toExamineRevoke(id){
		window.location.href="${ctxFront }/jiu/toExamineRevoke?uid=${uid}&orderId="+id;
	}
	
	//申请撤销
	function toApplyRevoke(id){
		window.location.href="${ctxFront }/jiu/toApplyRevoke?uid=${uid}&orderId="+id;
	}
	
	function toEvaluate(orderId){
		window.location.href="${ctxFront }/jiu/toEvaluate?uid=${uid}&orderId="+orderId;
	}
	
	function toSeeStoreAllEvaluate(storeId){
		window.location.href="${ctxFront }/jiu/toSeeStoreAllEvaluate?uid=${uid}&storeId="+storeId;
	}
	//拍照完成订单
	function toUploadPic(id){
		window.location.href="${ctxFront }/jiu/toUploadPic?uid=${uid}&orderId="+id;
	}
	function toUploadPicView(id){
		window.location.href="${ctxFront }/jiu/toUploadPicView?uid=${uid}&orderId="+id;
	}
	//个人中心
	function center(){
		window.location.href="${ctxFront }/jiu/center?uid=${uid}&v="+Math.random();
	}
	
	function getLocalTime(nS) {  
	    var date = new Date(nS);
	    return date.Format("yyyy-MM-dd hh:mm:ss"); 
	} 
	
	$(function(){
		Date.prototype.Format = function (fmt) { //author: meizz 
		    var o = {
		        "M+": this.getMonth() + 1, //月份 
		        "d+": this.getDate(), //日 
		        "h+": this.getHours(), //小时 
		        "m+": this.getMinutes(), //分 
		        "s+": this.getSeconds(), //秒 
		        "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
		        "S": this.getMilliseconds() //毫秒 
		    };
		    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
		    for (var k in o)
		    if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
		    return fmt;
		}
	});
</script>
</html>